<title>回答编辑</title>
  
<div class="layui-card layadmin-header">
  <div class="layui-breadcrumb" lay-filter="breadcrumb">
    <a lay-href="">主页</a>
    <a><cite>问答管理</cite></a>
    <a><cite>回答编辑</cite></a>
  </div>
</div>

<div class="layui-fluid">
  <div class="layui-card">
  	<div class="layui-card-header"><a lay-href="wendasns/answer/index" style="color: #990000;margin-right: 10px;">&lt;&lt; 返回上一级</a></div>
  	<div class="layui-card-body">
  	
<form class="layui-form" action="{:url('wendasns/answer/edit')}" method="post">
        <input type="hidden" name="id" value="{$data.id}">
      
            <div class="layui-form-item">
              <label class="layui-form-label">问题</label>
              <div class="layui-input-block">
			        <input type="text" value="{$data.questions.title}" class="layui-input layui-disabled" disabled>
              </div>
            </div>
            
            <div class="layui-form-item">
              <label class="layui-form-label">回答者</label>
              <div class="layui-input-inline">
			        <input type="text" value="{$data.users.username}" class="layui-input layui-disabled" disabled>
              </div>
            </div>
            
            <div class="layui-form-item">
              <label class="layui-form-label">回答</label>
              <div class="layui-input-block">
			        <textarea id="J_textarea" style="display: none;" name="content" data-id="">{$data.content}</textarea>
              </div>
            </div>
          
		  <div class="layui-form-item">
		    <label class="layui-form-label">点赞数</label>
		    <div class="layui-input-inline">
			        <input type="text" name="praise" value="{$data.praise}" lay-verify="number" class="layui-input">
		    </div>
		  </div>
		  
		  <div class="layui-form-item">
		    <label class="layui-form-label">评论数</label>
		    <div class="layui-input-inline">
			        <input type="text" value="{$data.comment}" class="layui-input layui-disabled" disabled>
		    </div>
		  </div>

		  <div class="layui-form-item">
		    <label class="layui-form-label">举报数</label>
		    <div class="layui-input-inline">
				<input type="text" value="{$data.report}" class="layui-input layui-disabled" disabled>
		    </div>
		  </div>

	  <div class="layui-form-item">
	    <label class="layui-form-label">发布时间</label>
	    <div class="layui-input-inline">
	        <input id="J_create_time" type="text" name="create_time" value="{$data.create_time}" class="layui-input">
	    </div>
	  </div>
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label">删除</label>
	    <div class="layui-input-inline">
	         <input type="radio" name="remove" value="1" title="是" {if $data.remove eq 1}checked{/if}>
	         <input type="radio" name="remove" value="0" title="否" {if $data.remove eq 0}checked{/if}>
	    </div>
	  </div>

  <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-inline">
	         <input type="radio" name="status" value="normal" title="正常" {if $data.status eq 'normal'}checked{/if}>
	         <input type="radio" name="status" value="check" title="待审核" {if $data.status eq 'check'}checked{/if}>
            </div>
          </div>
        </div>
        
            <div class="layui-form-item">
              <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="J_ajax_submit_btn"><i class="layui-icon layui-icon-ok-circle"></i>提交</button>
              </div>
            </div>
            
          </form>
  </div>
  </div>
</div>

<script src="/ueditor/ueditor.init.js?v={:time()}"></script>
<script>
;!function(){
  var $ = layui.$
  ,laydate = layui.laydate
  ,layedit = layui.layedit
  ,form = layui.form;
  
  form.render();

	layedit.set({
	  uploadImage: {
	    url: '{:url('wendasns/answer/upload')}'
	  },
	  height: 400
	});

	var index = layedit.build('J_textarea');
	layui.$('#J_textarea').attr('data-id',index);
	
	laydate.render({
    elem: '#J_create_time'
    ,type: 'datetime'
  });
  
}();
</script>